import { markRaw } from 'vue';
import { RouteRecordRaw } from 'vue-router';
import RouterTransition from '@/components/routerTransition.vue';

const routeName = 'customer';

const routes: Array<RouteRecordRaw> = [
    {
        path: '/customer',
        name: routeName,
        redirect: '/customer/merchant',
        component: markRaw(RouterTransition),
        meta: {
            title: 'yl.customerMgt',
            icon: 'UserSwitchOutlined',
        },
        children: [
            {
                path: 'merchant',
                name: `${routeName}-merchant`,
                meta: {
                    title: 'yl.merchantList',
                    icon: 'people',
                },
                component: () => import(/* webpackChunkName: "customer" */ '@/views/customer/merchant/index.vue'),
            },
            {
                path: 'agent',
                name: `${routeName}-agent`,
                meta: {
                    title: 'yl.agentList',
                    icon: 'people',
                },
                component: () => import(/* webpackChunkName: "customer" */ '@/views/customer/agent/index.vue'),
            },
            {
                path: 'store',
                name: `${routeName}-store`,
                meta: {
                    title: 'yl.storeList',
                    icon: 'people',
                },
                component: () => import(/* webpackChunkName: "customer" */ '@/views/customer/store/index.vue'),
            },
            {
                path: 'industry',
                name: `${routeName}-industry`,
                meta: {
                    title: 'yl.industry',
                    icon: 'people',
                },
                component: () => import(/* webpackChunkName: "customer" */ '@/views/customer/industry/index.vue'),
            },
            // {
            //     path: 'area',
            //     name: `${routeName}-area`,
            //     meta: {
            //         title: 'yl.area',
            //         icon: 'people',
            //     },
            //     component: () => import(/* webpackChunkName: "customer" */ '@/views/customer/area/index.vue'),
            // },
        ],
    },
];

export default routes;
